// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_DISPATCH_ORDER
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class InvDispatchOrderEntity : EntityBase
    {
        public InvDispatchOrderTable TableSchema
        {
            get
            {
                return InvDispatchOrderTable.Current;
            }
		}
		
		public InvDispatchOrderEntity()
        {

        }
		
		public InvDispatchOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DispatchOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ORDER_ID"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
			this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
			this.OrderPerson = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON"]));
			this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public InvDispatchOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.DispatchOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DISPATCH_ORDER_ID"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
			this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
			this.OrderPerson = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON"]));
			this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvDispatchOrderTable.Current;
            }
        }
		
		#region Perporty List
        public string DispatchOrderId
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_DISPATCH_ORDER_ID)); }
            set { SetData(InvDispatchOrderTable.C_DISPATCH_ORDER_ID, value); }
        }
		
        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_WAREHOUSE_CODE)); }
            set { SetData(InvDispatchOrderTable.C_WAREHOUSE_CODE, value); }
        }
		
        public string OrderType
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_ORDER_TYPE)); }
            set { SetData(InvDispatchOrderTable.C_ORDER_TYPE, value); }
        }
		
        public string OrderCode
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_ORDER_CODE)); }
            set { SetData(InvDispatchOrderTable.C_ORDER_CODE, value); }
        }
		
        public DateTime OrderDate
        {
            get { return Convert.ToDateTime(GetData(InvDispatchOrderTable.C_ORDER_DATE)); }
            set { SetData(InvDispatchOrderTable.C_ORDER_DATE, value); }
        }
		
        public string OrderPerson
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_ORDER_PERSON)); }
            set { SetData(InvDispatchOrderTable.C_ORDER_PERSON, value); }
        }
		
        public string RelatedOrder
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_RELATED_ORDER)); }
            set { SetData(InvDispatchOrderTable.C_RELATED_ORDER, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_REMARK)); }
            set { SetData(InvDispatchOrderTable.C_REMARK, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(InvDispatchOrderTable.C_CREATED_DATE)); }
            set { SetData(InvDispatchOrderTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_CREATED_BY)); }
            set { SetData(InvDispatchOrderTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(InvDispatchOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(InvDispatchOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(InvDispatchOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(InvDispatchOrderTable.C_APPROVED_DATE)); }
            set { SetData(InvDispatchOrderTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_APPROVED_BY)); }
            set { SetData(InvDispatchOrderTable.C_APPROVED_BY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(InvDispatchOrderTable.C_STATUS)); }
            set { SetData(InvDispatchOrderTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

